#ifndef		__BSP_DMAS_H_
#define		__BSP_DMAS_H_

#define     DMA_CHL_UART0_TX        0
#define     DMA_CHL_UART1_TX        1
#define     DMA_CHL_SPI0_TX         2
#define     DMA_CHL_SPI1_TX         3

#define     DMA_CHL_UART0_RX        8
#define     DMA_CHL_UART1_RX        9
#define     DMA_CHL_SPI0_RX         10
#define     DMA_CHL_SPI1_RX         11
#define     DMA_CHL_ADC_RX          12   

typedef		uint32_t	(*dHandler_callback)(uint16_t  val);

extern  void    Init_dmas(void);
extern  void    dmas_TX_Init(uint32_t ch, uint32_t  *txbuff, uint32_t length);
extern  void    dmas_RX_Init(uint32_t ch, uint32_t  *rxbuff, uint32_t length);
extern  uint32_t    dmas_Wait_BlK_Idle(uint32_t   ch);
extern  void    dmas_TX_Interrupt_Enable(uint32_t   ch);
extern  void    dmas_RX_Interrupt_Enable(uint32_t   ch);
extern	void	dmas_Register_RxCallback(dHandler_callback callback, uint32_t ch);
extern	void	dmas_Register_TxCallback(dHandler_callback callback, uint32_t ch);

#endif
